#include <cstdio>

int main( )
{
    __int64 n, m, t;
    while ( scanf("%I64d%I64d", &n, &m) != EOF )
    {
        if ( n % 2 == 0 && m % 2 == 0 )
        {
            if ( m * 2 == n )
                puts("2");
            else
                if ( m * 2 > n )
                    if ( m == n )
                        puts("1");
                    else
                        puts("3");
                else
                    printf("%I64d\n", ( n - ( m + 1 ) * 2 ) / m + 3);
        }
        if ( n % 2 == 0 && m % 2 == 1 )
        {
            t = m;
            if ( t * 2 >= n )
                t = n - t;
            if ( t * 2 == n )
                puts("2");
            else
                printf("%I64d\n", ( n - 2 * ( t + 1 ) ) / 2 / t * 2 + 4 );
        }
        if ( n % 2 == 1 && m % 2 == 0 )
            puts("No Solution!");
        if ( n % 2 == 1 && m % 2 == 1 )
            if ( n == m )
                puts("1");
            else
                printf("%I64d\n", ( n - m - 2 ) / 2 / m * 2 + 3);
    }
    return 0;
}
